#!/usr/bin/env python

import sys

from distutils.core import setup, Extension
from Pyrex.Distutils import build_ext

if sys.platform.startswith('win'):
    libraries = ['icuin', 'icuuc', 'icudt']
else:
    libraries = ['icui18n', 'icuuc', 'icudata']

setup(name='collate',
      version='0.2',
      author="Joe Wreschnig",
      author_email="joe.wreschnig@gmail.com",
      description="Python text collation",
      license="MIT / ZPL 2.1",
      ext_modules=[
          Extension('collate.icu._icu',
                    ['collate/icu/_icu.pyx'],
                    libraries=libraries)],
      cmdclass=dict(build_ext=build_ext),
      packages=["collate", "collate.icu"],
      long_description="""\
This module provides tools to sort strings in a 'human-expected'
order. Because human expectations are fuzzy and often
self-contradictory, the sort order is not guaranteed to be stable
between versions of this module (rather the opposite - the primary
reason to update it will probably be changed sort results). If
available, this module uses the ICU localization library. Otherwise,
it uses the system's locale database (and produces significantly worse
results).
"""
      )
